-- GENERATED SPELL FOR [Buhurda] --


function spell0_30581(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30581', 632, 1)
end

function spell1_30581(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30581', 6268, 1)
end

function spell2_30581(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30581', 5341, 1)
end

function spell3_30581(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_30581', 585, 1)
end

function spell4_30581(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_30581', 2000, 1)
end

function Sorts_30581(pUnit, Event)
local choix_sorts_30581 = math.random(0, 4)
if choix_sorts_30581 == 0 then
pUnit:RegisterEvent('spell0_30581', 1, 1)
end
if choix_sorts_30581 == 1 then
pUnit:RegisterEvent('spell1_30581', 1, 1)
end
if choix_sorts_30581 == 2 then
pUnit:RegisterEvent('spell2_30581', 1, 1)
end
if choix_sorts_30581 == 3 then
pUnit:RegisterEvent('spell3_30581', 1, 1)
end
if choix_sorts_30581 == 4 then
pUnit:RegisterEvent('spell4_30581', 1, 1)
end
end

function mob30581_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30581', math.random(1500, 3000), 1)
end

function mob30581_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30581_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30581_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30581, 1, 'mob30581_Action')
RegisterUnitEvent(30581, 2, 'mob30581_Leave')
RegisterUnitEvent(30581, 3, 'mob30581_Kill')
RegisterUnitEvent(30581, 4, 'mob30581_Die')
